package com.lmk.mkcc.enums;

import lombok.Getter;

/*使用枚举封装错误消息*/
@Getter
public enum GlobalErrorCode {

    OK("1","成功"),
    ERROE("0","失败"),

    // 公共异常 100开头
    SERVICE_PARAM_IS_NULL("10001", "参数不能为空！"),
    TIMOUT_ERROE("10002", "验证码超时，请稍后！"),
    CODE_ERROE("10003", "验证码超时，请稍后！"),
    FREQUENTLY_ERROE("10004", "操作频繁 ，请稍后！"),
    CODE_EXPIRED_ERROR("10005","验证码过期，请重新获取"),
    BLOCK_PHONE_ERROR("10006","该账号由于非法操作，已被拉黑！！"),

    // system异常 200开头

    // user异常 300开头
    CODE_MISMATCH_ERROR("30001","验证码错误！！"),
    USER_EXIST_ERROR("30002","用户已注册，请直接登录！！"),
    // uaa异常 400开头
    FUSE_ERROR("40001", "熔断了！！！"),

    // course异常
    COURSE_EXISTENCE_ERROR("50001","课程存在！"),
    COURSE_NULL_ERROR("50002","课程不存在"),
    COURSECOLLECT_ERROR("50003","没有人收藏该课程嗷！！"),
    COURSE_TYPE_ERROR("50004","课程类型不存在！！"),
    COURSE_TYPE_PATH_ERROR("50005","课程类型PATH不存在！！"),
    COURSE_NO_ONLINE_ERROR("50006","课程未上线"),
    COURSE_MARKET_ERROR("50007","课程market异常"),
    DATA_NULL_ERROR("50008","参数为空"),


    // 媒体异常
    NO_MEDIA_ERROR("60001","视频对象不存在亲！"),
    NO_DATA_ERROR("60002","data数据为空"),

    // order异常
    NO_REDISTOKEN_ERROR("70001","未获取到redis中的token"),
    TOKEN_DIFFERENT_ERROR("70002","token不相同"),
    NO_INFO_ERROR("70003","未获取到courseinfo信息"),
    NO_INFODATA_ERROR("70004","infodata为空"),
    NO_DTO_ERROR("70005","payextparamsDto为空"),

    // pay异常
    NO_PAYDTO_ERROR("80001","paydto为空"),
    NO_PAYORSER_ERROR("80002","支付订单不存在"),
    STATUS_ERROR("80003","订单状态不为待支付"),

    // kill异常
    NO_KILL_ACTIVITY_ERROR("90001","秒杀活动已经下线"),
    NO_KILL_ACTIVITY_BIGIN_ERROR("90002","秒杀活动已开始！"),
    KILL_COURSE_ERROR("90003","课程已经加入秒杀，不可重复添加！"),
    KILLACTIVITY_ISNULL_ERROR("90004","killActivity为空"),
    STATUS_IS_ERROR("90005","活动状态异常"),
    NO_KILLCOURSE_ERROR("90006","活动中不存在秒杀课程"),
    DATE_OUT_ERROR("90007","发布时间不能在秒杀开始时间之间"),
    ;

    private String message;
    private String code;



    GlobalErrorCode(String code, String message) {
        this.code = code;
        this.message = message;
    }
}
